package com.mostromas.ess.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mostromas.ess.entities.ProductPrice;
import com.mostromas.ess.product.mapper.ProductPriceMapper;
import com.mostromas.ess.product.service.IProductPriceService;
import org.springframework.stereotype.Service;

@Service
public class ProductPriceServiceImpl extends ServiceImpl<ProductPriceMapper, ProductPrice> implements IProductPriceService {
    @Override
    public ProductPrice findPriceByProductId(String id) {
        QueryWrapper<ProductPrice> wrapper = new QueryWrapper<>();
        wrapper.eq("product_id",id);
        ProductPrice price = baseMapper.selectById(id);
        return price;
    }
}
